package com.qing.eduservice.controller.front;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qing.eduservice.entity.pojo.EduTeacher;
import com.qing.eduservice.service.EduTeacherService;
import com.qing.servicebase.utils.ResponseResult;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName Yjx
 * @Description TODO
 * @date 2022/9/16 11:57
 * @Version 1.0
 */
@RestController
@RequestMapping("/eduservice/front/teacher")
@CrossOrigin
public class FrontTeacherController {

    private final EduTeacherService eduTeacherService;

    public FrontTeacherController(EduTeacherService eduTeacherService) {
        this.eduTeacherService = eduTeacherService;
    }

    @GetMapping(value = "/{page}/{pageSize}")
    public ResponseResult pageList(@PathVariable("page") int page, @PathVariable("pageSize") int pageSize){
        Page<EduTeacher> pageParam = new Page<EduTeacher>(page, pageSize);
        return eduTeacherService.pageListWeb(pageParam);
    }
}
